
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Sample webpage</title>

    <!-- Bootstrap core CSS -->
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">


    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style type="text/css">
      /* Sticky footer styles */
      html {
        position: relative;
        min-height: 100%;
      }
      body {
        /* Margin bottom by footer height */
        margin-bottom: 60px;
      }
      .footer {
        position: absolute;
        bottom: 0;
        width: 100%;
        /* Set the fixed height of the footer here */
        height: 60px;
        background-color: #f5f5f5;
      }


      /* Custom page CSS
      -------------------------------------------------- */
      /* Not required for template or sticky footer method. */

      .container {
        width: auto;
        max-width: 1024px;
        padding: 0 15px;
      }
      .container .text-muted {
        margin: 20px 0;
      }
      label{
        cursor: pointer;
        color: #337ab7;
        text-decoration: none;
      }
      label:hover,
      label:focus {
        color: #23527c;
        text-decoration: underline;
      }

      .spoiler-toggle{
        position: absolute;
        top: -99999px;
      }
      [data-spoiler]{
        display: none;
      }
      input[type="checkbox"]:checked + [data-spoiler]{
        display: initial;
      }

    </style>
  </head>

  <body>

    <!-- Begin page content -->
    <div class="container">
      <div class="page-header">
        <h1>Welcome</h1>
      </div>
      <p class="lead">You've successfully run API server!</p>

      <p>What to do next:</p>
      <ul>
        <li>
          Go to <a href="/admin">admin</a> section to manage hyperledger
        </li>
        <li>Use
          <a href="https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v-read-only" target="_blank">docker volume</a>
          to mount your <u>web app</u> here or just put static files in <code>www</code> folder:
          <blockquote>
            <code>docker run -v /path/to/your/app:/usr/src/app/www dockeraltoros/fabric-rest</code>
          </blockquote>
        </li>

        <li>Use
          <a href="https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v-read-only" target="_blank">docker volume</a>
          to mount your <u>middleware</u> here or just put the files in <code>middleware</code> folder:
          <blockquote>
            <code>docker run -v /path/to/your/middleware:/usr/src/app/middleware dockeraltoros/fabric-rest</code>
          </blockquote>
          <p>
            The middleware is a function, which should return <a href="http://expressjs.com/en/guide/using-middleware.html" target="_blank">an express middleware</a>.
          </p>
          <p>
            <label for="example1cb">show/hide an example</label>
          </p>

          <input type="checkbox" name="example1" id="example1cb" class="spoiler-toggle">
          <div data-spoiler>
            <h3>Example</h3>
            <kbd>middleware/sample.js</kbd>
            <blockquote style="font-size: 95%">
              <samp>module.exports = function(require){
                <br>&nbsp;&nbsp;// use 'require' to load server modules
                <br>&nbsp;&nbsp;return function(req, res, next) {
                <br>&nbsp;&nbsp;&nbsp;&nbsp;console.log('[%s] %s  %s', new Date().toISOString(), req.method.toUpperCase(), req.url);
                <br>&nbsp;&nbsp;&nbsp;&nbsp;next();
                <br>&nbsp;&nbsp;};
                <br>}
              </samp>
            </blockquote>

            <kbd>middleware/map.json</kbd>
            <blockquote style="font-size: 95%">
              <samp>{
                <br>&nbsp;&nbsp;"middleware":[
                <br>&nbsp;&nbsp;&nbsp;&nbsp;{
                <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"name":"Sample module",
                <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"file":"./sample.js"
                <br>&nbsp;&nbsp;&nbsp;&nbsp;}
                <br>&nbsp;&nbsp;]
                <br>}
              </samp>
            </blockquote>
          </div>
        </li>

      </ul>



    </div>

    <footer class="footer">
      <div class="container">
        <p class="text-muted">Made by Altoros</p>
      </div>
    </footer>



    <!-- Latest compiled and minified JavaScript -->
    <!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> -->

  </body>
</html>
